class AIChatResponse {
  final int code;
  final AIChatData data;
  final String message;

  AIChatResponse({
    required this.code,
    required this.data,
    required this.message,
  });

  factory AIChatResponse.fromJson(Map<String, dynamic> json) {
    return AIChatResponse(
      code: json['code'] as int,
      data: AIChatData.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String,
    );
  }
}

class AIChatData {
  final String? answer;
  final String conversationId;
  final int showSec;

  AIChatData({
    this.answer,
    required this.conversationId,
    required this.showSec,
  });

  factory AIChatData.fromJson(Map<String, dynamic> json) {
    return AIChatData(
      answer: json['answer'] as String?,
      conversationId: json['conversation_id'] as String,
      showSec: json['show_sec'] as int,
    );
  }
}
